-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Airtable connector #3564
Airtable connector #3564
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
4a86788
to
d0c4a42
Compare
icon: AirtableIcon, | ||
displayName: "Airtable", | ||
category: SourceCategory.Other, | ||
docs: "https://docs.onyx.app/connectors/airtable", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs link doesn't exist yet
def _should_be_metadata(self, field_type: str) -> bool: | ||
"""Determine if a field type should be treated as metadata.""" | ||
# NOTE: all are made lowercase to avoid case sensitivity issues | ||
metadata_field_types = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this should be a class var / constant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! I did this for closer proximity between definition and use (e.g. no need to scroll up to check if something is metadata), but I can see both ways being good (e.g. this allows for easier re-use of the metadata types)
) | ||
|
||
record_document = Document( | ||
id=str(record_id), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
odds of a collision here are probably low due to how the id's are formatted, but a prefix on the document id has helped avoid them in other connectors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, added!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test needs updating with id changing format, otherwise looks good.
Description
Adds Airtable connector.
How Has This Been Tested?
"Unit" test + manually creating connector + running it locally.
Backporting (check the box to trigger backport action)
Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.